fix(fork): scope task list invalidation to current workspace#4350
fix(fork): scope task list invalidation to current workspace#4350waleedlatif1 merged 2 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Updates the fork action UI ( Reviewed by Cursor Bugbot for commit 31a4006. Configure here. |
Greptile SummaryThis PR fixes Confidence Score: 5/5Safe to merge — targeted bug fix with no regressions introduced. All three changes are correct and follow established project conventions. The invalidation scoping fix matches every other task mutation hook, No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant UI as MessageActions
participant Hook as useForkTask(workspaceId)
participant API as /api/fork
participant QC as QueryClient
UI->>Hook: forkTask.mutate(params)
Hook->>API: POST forkChat(params)
API-->>Hook: { id: newTaskId }
Note over Hook,QC: onSettled fires (success or error)
Hook->>QC: invalidateQueries(taskKeys.list(workspaceId))
Note over QC: Only refreshes current workspace's task list
QC-->>UI: Re-fetches tasks for workspaceId
Reviews (2): Last reviewed commit: "fix(sidebar): remove mutation objects fr..." | Re-trigger Greptile |
Mutation objects are not referentially stable in TanStack Query v5 — only .mutate() and .mutateAsync() are stable. Removed deleteTaskMutation, deleteTasksMutation, markTaskReadMutation, and markTaskUnreadMutation from their respective useCallback dependency arrays to avoid unnecessary recreations on every mutation state update.
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 31a4006. Configure here.
* fix(fork): scope task list invalidation to current workspace * fix(sidebar): remove mutation objects from useCallback deps Mutation objects are not referentially stable in TanStack Query v5 — only .mutate() and .mutateAsync() are stable. Removed deleteTaskMutation, deleteTasksMutation, markTaskReadMutation, and markTaskUnreadMutation from their respective useCallback dependency arrays to avoid unnecessary recreations on every mutation state update.
Summary
Type of Change
Testing
Tested manually
Checklist